package com.ruoyi.score.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.ruoyi.keep.domain.Userlevel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.io.Serializable;

/**
 * 积分对象 score
 * 
 * @author ruoyi
 * @date 2024-08-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Score implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    @Excel(name = "主键id")
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 用户名称 */
    @Excel(name = "用户id")
    @TableField(exist = false)
    private String userName;

    /** 当前积分 */
    @Excel(name = "当前积分")
    private Long scoreCurrent;

    /** 累计积分 */
    private Long scoreTotal;

    public Score(Long userId, Long scoreCurrent) {
        this.userId = userId;
        this.scoreCurrent = scoreCurrent;
    }

    /** 用户等级信息 */
    @TableField(exist = false)
    private Userlevel userlevel;

    /** 用户等级id */
    @TableField(exist = false)
    private Long userlevelId;

    /** 逻辑删除 */
    @TableLogic
    private Integer del;


}
